@extends('layouts.admin.application')

@section('content')
    <div class="main-content">
        <div class="col-xs-12">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="#">首页</a></li>
                    <li><a href="{{ route('cashier.product.index') }}">商品管理</a></li>
                    <li class="active">新增商品</li>
                </ul>
            </div>

            <form class="form-horizontal" role="form" action="" method="post" style="margin-top: 10px;">
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">商品名称</label>

                    <div class="col-sm-9">
                        <input type="text" name="name" placeholder="商品名称，你懂得~" class="col-xs-10 col-sm-5">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">商品缩略图</label>

                    <div class="col-sm-9">
                        <div class="am-form-group am-form-file new_thumb">
                            <button type="button" class="btn-success">
                                <i class="icon-cloud-upload" id="loading"></i> 上传商品图片
                            </button>
                            <input type="file" id="image_upload" style="display: none;">
                            <input type="hidden" name="image">
                        </div>
                        <hr style="border-top:1px dashed #0066CC;">
                        <div>
                            <img src="" id="img_show" style="max-height: 200px;">
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">商品分类</label>

                    <div class="col-sm-9">
                        <select class="col-xs-10 col-sm-5" name="category_id">
                            <option value="0">顶级分类</option>
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">商品品牌</label>

                    <div class="col-sm-9">
                        <select class="col-xs-10 col-sm-5" name="category_id">
                            <option value="0">请选择</option>
                            <option value=""></option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">零售价</label>

                    <div class="col-sm-9">
                        <input type="text" name="price" class="col-xs-10 col-sm-5">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">会员价</label>

                    <div class="col-sm-9">
                        <input type="text" name="price" class="col-xs-10 col-sm-5">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">采购价</label>

                    <div class="col-sm-9">
                        <input type="text" name="price" class="col-xs-10 col-sm-5">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">库存</label>

                    <div class="col-sm-9">
                        <input type="text" name="number" class="col-xs-10 col-sm-5">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">供货商</label>

                    <div class="col-sm-9">
                        <select class="col-xs-10 col-sm-5" name="category_id">
                            <option value="0">请选择</option>
                            <option value=""></option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">排序</label>

                    <div class="col-sm-9">
                        <input type="text" name="sort_order" class="col-xs-10 col-sm-5">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right">商品描述</label>

                    <div class="col-sm-9">
                        <textarea id="description" name="description" cols="47" rows="7"></textarea>

                    </div>
                </div>

                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-info" type="submit"><i class="icon-ok bigger-110"></i>保存</button>
                        &nbsp; &nbsp; &nbsp;
                        <a class="btn" onclick="javascript:history.back(-1);return false;"><i
                                    class="icon-undo bigger-110"></i>返回</a>
                    </div>
                </div>
            </form>
        </div>

    </div>
@endsection

@section('js')
    <script src="/vendor/html5-fileupload/jquery.html5-fileupload.js"></script>
    <script src="/js/upload.js"></script>
@endsection